(ido-save-history): Use emacs-mule coding system instead of
authorJuanma Barranquero <lekktu@gmail.com>
Tue, 4 Dec 2007 15:40:26 +0000 (15:40 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Tue, 4 Dec 2007 15:40:26 +0000 (15:40 +0000)
utf-8 to save filenames (it's safer in Emacs 22).  Set the
`coding' local variable on the first line of the file.

lisp/ido.el

index 9b1f6a634aac0df9850369f1214128dba2821998..41149038b0e35028c2c8e48835d4c0735c6b8b19 100644 (file)
@@ -1309,7 +1309,8 @@ Value is an integer which is number of chars to right of prompt.")
       (unwind-protect
          (with-current-buffer buf
            (erase-buffer)
-           (setq buffer-file-coding-system 'utf-8)
+           (insert ";;; -*- coding: emacs-mule -*-\n")
+           (setq buffer-file-coding-system 'emacs-mule)
            (ido-pp 'ido-last-directory-list)
            (ido-pp 'ido-work-directory-list)
            (ido-pp 'ido-work-file-list)
@@ -1317,7 +1318,7 @@ Value is an integer which is number of chars to right of prompt.")
            (if (listp ido-unc-hosts-cache)
                (ido-pp 'ido-unc-hosts-cache)
              (insert "\n;; ----- ido-unc-hosts-cache -----\nt\n"))
-           (insert "\n;; Local Variables:\n;; coding: utf-8\n;; End:\n")
+           (insert "\n")
            (write-file ido-save-directory-list-file nil))
        (kill-buffer buf)))))